#!/bin/bash

output_file=test-all.result
tmp_file=$$.tmp

function execute_it()
{
  echo "-------------------------------------"
  echo $1
  ./sabc $f 
  echo "-------------------------------------"

  return $?
}


rm $output_file

find . -name *class > $tmp_file

for f in $(cat $tmp_file) ; do

  echo "Running on  $f"
  execute_it $f >> $output_file

  if [ $? != 0 ] ; then
    echo "Failed on $f";
    exit 1
  fi


done

rm $tmp_file
exit 0

